#include<bits/stdc++.h>
using namespace std;

bool isok(int n, int sn){
    while(n !=0){
        if(n%10 != sn%10) return false;
        n = n/10;
        sn = sn/10;
    }
    return true;
}

int main(){
    int n;
    while(cin>>n){
        int sn = n*n;
        if(isok(n, sn)) cout<<"Yes!"<<endl;
        else cout<<"No!"<<endl;
    }
}